﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PrincipalAnidada.master" AutoEventWireup="true" CodeBehind="VisualizarEspacios.aspx.cs" Inherits="ProyectoVeranoAECAasp.Vistas.VisualizarEspacios" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <div style="width: 712px; height: 563px">
     <div id = "EncabezadoGU" class = "cPosRel">
     <h1>
        <asp:Label ID="borrarEsto" runat="server" Text="Visualizar espacios"></asp:Label>
    </h1>
<div id="DatosSesionGU" class="cPosAbs">
            <fieldset id="AgrupadorDatosSesionGU" class="cPosRel">
                <legend>
                    <strong>
                        <asp:Label ID="LoginEtiquetaGroup2" runat="server" Text="maestrada"></asp:Label>
                    </strong>
                </legend>
                <p id="ParrafoNombreGU" class="cPosAbs">
                    <asp:Label ID="Label9" runat="server" Font-Size="Smaller" Text="Nombre: "></asp:Label>
                </p>
                <p id="ParrafoTipoUGU" class="cPosAbs">
                    <asp:Label ID="Label10" runat="server" Font-Size="Smaller" Text="Tipo Usuario"></asp:Label>
                </p>
                <p id="ParrafoBotonSalirGU" class="cPosAbs">
                    <asp:LinkButton ID="LinkButton1" Font-Size="Small" runat="server" 
                        onclick="LinkButtonSalir_Click">Salir</asp:LinkButton>   
                </p>
            </fieldset>
        </div>
    </div>
    
     <p>
         Área:
         <asp:DropDownList ID="DropDownList1" runat="server" 
             DataSourceID="SqlDataSource2" DataTextField="NombreArea" 
             DataValueField="idAreaEdificio" 
             onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
             AutoPostBack="True">
         </asp:DropDownList>
         <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
             ConnectionString="<%$ ConnectionStrings:ProyectoGestionEspaciosConnectionString %>" 
             SelectCommand="SELECT [NombreArea], [idAreaEdificio] FROM [AreaEdificio]">
         </asp:SqlDataSource>
    </p>
     <p>
         Espacio:
         <asp:DropDownList ID="DropDownList2" runat="server" 
             DataSourceID="SqlDataSource1" DataTextField="IdNombre" 
             DataValueField="idEspacio" AutoPostBack="True" 
             onselectedindexchanged="DropDownList2_SelectedIndexChanged">
         </asp:DropDownList>
         <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
             ConnectionString="<%$ ConnectionStrings:ProyectoGestionEspaciosConnectionString %>" 
             
             
             SelectCommand="SELECT [IdNombre], [FKID_AreaEdificio], [idEspacio] FROM [Espacio] WHERE ([FKID_AreaEdificio] = @FKID_AreaEdificio)" 
             onselecting="SqlDataSource1_Selecting">
             <SelectParameters>
                 <asp:ControlParameter ControlID="DropDownList1" Name="FKID_AreaEdificio" 
                     PropertyName="SelectedValue" Type="Int32" />
             </SelectParameters>
         </asp:SqlDataSource>
    </p>
     <p>
         Fecha:
         <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
             BorderColor="#3366CC" Font-Names="Verdana" 
             Font-Size="8pt" ForeColor="#003399" Height="200px" 
             onselectionchanged="Calendar1_SelectionChanged" Width="220px" 
             BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest">
             <DayHeaderStyle ForeColor="#336666" 
                 Height="1px" BackColor="#99CCCC" />
             <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
             <OtherMonthDayStyle ForeColor="#999999" />
             <SelectedDayStyle BackColor="#009999" ForeColor="#CCFF99" Font-Bold="True" />
             <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
             <TitleStyle BackColor="#003399" Font-Bold="True" 
                 Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" BorderColor="#3366CC" 
                 BorderWidth="1px" />
             <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
             <WeekendDayStyle BackColor="#CCCCFF" />
         </asp:Calendar>
    </p>
    
        <div id="SeccionVisualizarEspacios" class="cPosAbs" style="top:219px; left:268px;">
         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
             BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
             CellPadding="4" DataSourceID="SqlDataSource3" 
             onselectedindexchanged="GridView1_SelectedIndexChanged">
             <Columns>
                 <asp:BoundField DataField="Hora" HeaderText="Hora" SortExpression="Hora" />
                 <asp:BoundField DataField="Asunto" HeaderText="Asunto" 
                     SortExpression="Asunto" />
                 <asp:BoundField DataField="Descripcion" HeaderText="Descripcion" 
                     SortExpression="Descripcion" />
                 <asp:BoundField DataField="CantidadTotalHoras" HeaderText="CantidadTotalHoras" 
                     SortExpression="CantidadTotalHoras" />
             </Columns>
             <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
             <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
             <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
             <RowStyle BackColor="White" ForeColor="#003399" />
             <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
             <SortedAscendingCellStyle BackColor="#EDF6F6" />
             <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
             <SortedDescendingCellStyle BackColor="#D6DFDF" />
             <SortedDescendingHeaderStyle BackColor="#002876" />
         </asp:GridView>
     </div>
     <p>
         <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
             ConnectionString="<%$ ConnectionStrings:ProyectoGestionEspaciosConnectionString %>" 
             SelectCommand="sp_ObtenerHorasReservadas" 
             SelectCommandType="StoredProcedure">
             <SelectParameters>
                 <asp:ControlParameter ControlID="DropDownList2" DefaultValue="" 
                     Name="pi_IDEspacio" PropertyName="SelectedValue" Type="Int32" />
                 <asp:ControlParameter ControlID="Calendar1" DbType="Date" DefaultValue="" 
                     Name="pi_FechaReser" PropertyName="SelectedDate" />
             </SelectParameters>
         </asp:SqlDataSource>
    </p>
     <p>
         &nbsp;</p>
     <p>
         &nbsp;</p>
     <p>
         &nbsp;</p>
     <p>
         &nbsp;</p>
     <p>
         &nbsp;</p>
    <p>
        <asp:LinkButton ID="LinkButtonSalir" runat="server" 
             onclick="LinkButtonSalir_Click">Salir</asp:LinkButton>
    </p>
    </div>
</asp:Content>
